package ClassDay4;

import ClassDay4.Dao.AppDao5;
import ClassDay4.Dao.AppDao6;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TheMain {
    public  static  void  main(String[] args){
        ApplicationContext actx=new AnnotationConfigApplicationContext(CompScan.class);
        AppDao5 ad= (AppDao5) actx.getBean("AppDao5");
        ad.UpData();
        ad.init(5);
        AppDao6 ad6=actx.getBean(AppDao6.class);
        ad6.init(4);
        ad6.UpData();
    }
}
